//
//  WYCRealnameController.m
//  51信用卡
//
//  Created by 中企互联 on 2017/11/1.
//  Copyright © 2017年 中企互联. All rights reserved.
//

#import "WYCRealnameController.h"

@interface WYCRealnameController ()

@end

@implementation WYCRealnameController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    //setNav
    [self setupNav];
    
    
    [self setupCreat];
}

#pragma make -------->>界面布局
- (void)setupCreat{
    /********************身份证***************/
    //身份证认证
    UILabel * IDrealLabel = [[UILabel alloc] init];
    IDrealLabel.frame = CGRectMake(40 * px, 64 + 40 * px, ScreenWidth, 60 * px);
    IDrealLabel.text = @"身份证认证";
    IDrealLabel.font = smallLight;
    IDrealLabel.textColor = WYCbigGrayColor;
    [self.view addSubview:IDrealLabel];
    
    
    //身份证北京View
    UIView * IDView = [[UIView alloc] init];
    IDView.frame = CGRectMake(0, CGRectGetMaxY(IDrealLabel.frame) + 20 * px, ScreenWidth, 500 * px);
    IDView.backgroundColor = wycwhiteColor;
    [self.view addSubview:IDView];
    
    //身份证正面
    UIImageView * IDimageView = [[UIImageView alloc] init];
    IDimageView.frame = CGRectMake(40 * px, 40 * px, ScreenWidth / 2 - 80 * px, IDView.height / 3 * 2);
    IDimageView.image = [UIImage imageNamed:@"ID"];
    [IDView addSubview:IDimageView];
    
    //身份证正面
    UILabel * IDlabel = [[UILabel alloc] init];
    IDlabel.frame = CGRectMake(IDimageView.x, CGRectGetMaxY(IDimageView.frame) + 20 * px, IDimageView.width, 80 * px);
    IDlabel.text = @"身份证正面";
    IDlabel.font = forLight;
    IDlabel.textAlignment = NSTextAlignmentCenter;
    [IDView addSubview:IDlabel];
    
    
    //身份证正面
    UIImageView * sideIDimageView = [[UIImageView alloc] init];
    sideIDimageView.frame = CGRectMake(CGRectGetMaxX(IDimageView.frame) + 80 * px, IDimageView.y, IDimageView.width, IDimageView.height);
    sideIDimageView.image = [UIImage imageNamed:@"side_ID"];
    [IDView addSubview:sideIDimageView];
    
    
    //身份证反面
    UILabel * sideIDlabel = [[UILabel alloc] init];
    sideIDlabel.frame = CGRectMake(sideIDimageView.x, IDlabel.y, IDlabel.width, IDlabel.height);
    sideIDlabel.text = @"身份证反面";
    sideIDlabel.font = forLight;
    sideIDlabel.textAlignment = NSTextAlignmentCenter;
    [IDView addSubview:sideIDlabel];
    
    
    /*******************手持身份证**************/
    //手持身份证
    UILabel * IDholdLabel = [[UILabel alloc] init];
    IDholdLabel.frame = CGRectMake(IDrealLabel.x, CGRectGetMaxY(IDView.frame) + 20 * px, ScreenWidth, 60 * px);
    IDholdLabel.text = @"手持身份证";
    IDholdLabel.font = smallLight;
    IDholdLabel.textColor = WYCbigGrayColor;
    [self.view addSubview:IDholdLabel];
    
    
    //手持身份证View
    UIView * IDholdView = [[UIView alloc] init];
    IDholdView.frame = CGRectMake(0, CGRectGetMaxY(IDholdLabel.frame) + 20 * px, ScreenWidth, 500 * px);
    IDholdView.backgroundColor = wycwhiteColor;
    [self.view addSubview:IDholdView];
    
    //手持身份证正面
    UIImageView * IDholdimageView = [[UIImageView alloc] init];
    IDholdimageView.frame = CGRectMake(40 * px, 40 * px, ScreenWidth / 2 - 80 * px, IDView.height / 3 * 2);
    IDholdimageView.image = [UIImage imageNamed:@"Hold_ID"];
    [IDholdView addSubview:IDholdimageView];
    
    //手持身份证正面
    UILabel * IDholdlabel = [[UILabel alloc] init];
    IDholdlabel.frame = CGRectMake(IDholdimageView.x, CGRectGetMaxY(IDholdimageView.frame) + 20 * px, IDholdimageView.width, 80 * px);
    IDholdlabel.text = @"手持身份证正面";
    IDholdlabel.font = forLight;
    IDholdlabel.textAlignment = NSTextAlignmentCenter;
    [IDholdView addSubview:IDholdlabel];
    
    
    //手持身份证正面
    UIImageView * IDsideimageView = [[UIImageView alloc] init];
    IDsideimageView.frame = CGRectMake(CGRectGetMaxX(IDholdimageView.frame) + 80 * px, IDholdimageView.y, IDholdimageView.width, IDholdimageView.height);
    IDsideimageView.image = [UIImage imageNamed:@"side_ID"];
    [IDholdView addSubview:IDsideimageView];
    
    
    //手持身份证反面
    UILabel * holdsideIDlabel = [[UILabel alloc] init];
    holdsideIDlabel.frame = CGRectMake(sideIDimageView.x, IDholdlabel.y, IDholdlabel.width, IDholdlabel.height);
    holdsideIDlabel.text = @"手持身份证反面";
    holdsideIDlabel.font = forLight;
    holdsideIDlabel.textAlignment = NSTextAlignmentCenter;
    [IDholdView addSubview:holdsideIDlabel];
    
    
    /*******************添加银行卡**************/
    //手持身份证
    UILabel * cardLabel = [[UILabel alloc] init];
    cardLabel.frame = CGRectMake(IDrealLabel.x, CGRectGetMaxY(IDholdView.frame) + 20 * px, ScreenWidth, 60 * px);
    cardLabel.text = @"添加银行卡";
    cardLabel.font = smallLight;
    cardLabel.textColor = WYCbigGrayColor;
    [self.view addSubview:cardLabel];
    
    
    //手持身份证View
    UIView * cardView = [[UIView alloc] init];
    cardView.frame = CGRectMake(0, CGRectGetMaxY(cardLabel.frame) + 20 * px, ScreenWidth, 420 * px);
    cardView.backgroundColor = wycwhiteColor;
    [self.view addSubview:cardView];
    
    //银行卡正面
    UIImageView * cardimageView = [[UIImageView alloc] init];
    cardimageView.frame = CGRectMake(40 * px, 40 * px, ScreenWidth / 2 - 80 * px, IDView.height / 3 * 2);
    cardimageView.image = [UIImage imageNamed:@"Hold_ID"];
    [cardView addSubview:cardimageView];
    
    //提交按钮
    UIButton * saveButton = [[UIButton alloc] init];
    saveButton.frame = CGRectMake(40 * px, CGRectGetMaxY(cardView.frame) + 40 * px, ScreenWidth - 80 * px, 150 * px);
    [saveButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    saveButton.layer.cornerRadius = 5;
    [saveButton addTarget:self action:@selector(saveButtonClick) forControlEvents:UIControlEventTouchUpInside];
    saveButton.backgroundColor = bigredColor;
    saveButton.titleLabel.font = MiddleLight;
    [saveButton setTitle:@"提交" forState:UIControlStateNormal];
    [self.view addSubview:saveButton];
    
}


#pragma make ------->>nav界面修改
- (void)setupNav{
    
    self.view.backgroundColor = WYCGlobalBg;
    self.navigationItem.title = @"实名认证";
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    [self.navigationController.navigationBar setBarTintColor:bigredColor];
    
}

#pragma make ------->>提交按钮事件
- (void)saveButtonClick{
    WYCLogFunc;
    
}
@end
